﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.Oxilly.Qasparov.QsbClient.QsbCommandService
{
    public partial class QsbMessage
    {
        public QsbMessage()
        {
            this.MessageAttributes = new Dictionary<string, string>();
        }

        /// <summary>
        /// Returns a copie of itself as a QsbMessage
        /// doing so it removes all fields added by a derived class
        /// </summary>
        /// <returns></returns>
        public QsbMessage Strip()
        {
            return new QsbMessage
            {
                Description = this.Description,
                MessageAttributes = this.MessageAttributes,
                MessageSender = this.MessageSender,
                MessageType = this.MessageType
            };
        }
    }
}
